package bsc.ejb.entity;

import bsc.ejb.entity.DimensionalCut.Type;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author memozac
 */
@Entity
public class DimensionalCutMember implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idDimensionalCutMember;

    @ManyToOne
    @JoinColumn(name="idDimensionMember",nullable=false,updatable=true)
    private DimensionMember dimensionMember;

    @ManyToOne
    @JoinColumn(name="idScoreCard",nullable=false,updatable=true)
    private DimensionalCut dimensionalCut;


    public Long getIdDimensionalCutMember() {
        return idDimensionalCutMember;
    }

    public DimensionMember getDimensionMember() {
        return dimensionMember;
    }

    public void setDimensionMember(DimensionMember dimensionMember) {
        this.dimensionMember = dimensionMember;
    }

    public DimensionalCut getDimensionalCut() {
        return dimensionalCut;
    }

    public void setDimensionalCut(DimensionalCut dimensionalCut) {
        this.dimensionalCut = dimensionalCut;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDimensionalCutMember != null ? idDimensionalCutMember.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof DimensionalCutMember)) {
            return false;
        }
        DimensionalCutMember other = (DimensionalCutMember) object;
        if ((this.idDimensionalCutMember == null && other.idDimensionalCutMember != null) || (this.idDimensionalCutMember != null && !this.idDimensionalCutMember.equals(other.idDimensionalCutMember))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bsc.ejb.entity.DimensionalCutMember[id=" + idDimensionalCutMember + "]";
    }

}//ends of class
